package com.dlyk.mapper;

import com.dlyk.bean.TPermission;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TPermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TPermission record);

    int insertSelective(TPermission record);

    TPermission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TPermission record);

    int updateByPrimaryKey(TPermission record);

    /**
     * 查询当前用户的菜单权限
     * @param userId
     * @return
     */
    List<TPermission> selectMenuPermissionByUserId(Integer userId);

    /**
     * 查询当前用户的功能权限
     * @param id
     * @return
     */
    List<TPermission> selectPermissionByUserId(Integer id);
}